package com.sand.feign;

import com.sand.dto.Owner.signSelect;
import com.sand.entity.buy.detail;
import com.sand.entity.buy.scheme;
import com.sand.result.PageResult;
import com.sand.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("juao-owner")
public interface OwnerFeign {


    /**
     * 根据id获取方案
     * @param id
     * @return
     */
    @PostMapping("/scheme/getid")
    public ResponseResult<scheme> getid(@RequestBody Integer id);


    /**
     * 根据id查询预购
     */
    @PostMapping("/detail/getByid")
    ResponseResult<detail> getByid(@RequestBody Integer id);


    /**
     * 客户根据标记获取标记的商品
     */
    @PostMapping("/sign/get")
    PageResult<List<signSelect>> select(@RequestBody String sign);

}
